package io.scnb.lesson001.demo20;

import org.springframework.context.annotation.Bean;

/**
 * 不加@Configuration注解会怎么样
 *
 */
public class ConfigBean1 {

    @Bean
    public User user1() {
        return new User();
    }

    @Bean("user2Bean")
    public User User2() {
        return new User();
    }

    //bean名称为：user3Bean，2个别名：[user3BeanAlias1,user3BeanAlias2]
    @Bean({"user3Bean", "user3BeanAlias1", "user3BeanAlias2"})
    public User user3() {
        return new User();
    }
}
